
module.exports = {
    // 查询角色
    roleList: `SELECT * FROM role WHERE role_name LIKE ? AND role_description LIKE ? AND role_status = 1 LIMIT 10 OFFSET ?`,
    // 查询总数
    totalCount: `SELECT COUNT(*) AS total FROM role WHERE role_name LIKE ? AND role_description LIKE ? AND role_status = 1`,
    // 新增角色
    addRole: `INSERT INTO role(role_name,role_remark,role_description,role_menu) VALUES(?,?,?,?)`,
    // 编辑角色
    editRole: `UPDATE role SET role_name = ?, role_remark = ?, role_description = ?, role_menu = ? WHERE role_id = ?`,
    // 删除角色
    deleteRole: `UPDATE role SET role_status = 2 WHERE role_id = ?`,
    // 查询角色是否存在
    findExists: `SELECT * FROM role WHERE role_name = ? AND role_status = 1`,

    userRole: `SELECT * FROM role WHERE role_name IN (?);`,
}
